package com.hyd.tweet.util;

import java.util.Arrays;

/**
 * (description)
 *
 * @author yiding.he
 */
public class ArrayUtils {

    public static boolean contains(Object[] arr, Object item) {
        Object[] copy = new Object[arr.length];
        System.arraycopy(arr, 0, copy, 0, arr.length);

        Arrays.sort(copy);
        return Arrays.binarySearch(copy, item) >= 0;
    }
}
